﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using WindGoes6.Forms;

namespace DataCollector
{
    public partial class MainForm : Form
    {


        public void ShowForm(Form form)
        {
            this.Hide();
            form.StartPosition = FormStartPosition.CenterScreen;
            form.ShowDialog();
            Show();
        }

        public MainForm()
        {
            InitializeComponent();
        }


        private void MainForm_Load(object sender, EventArgs e)
        {
            this.Text = $"{values.AppName} Ver.{values.Version}";
        }

        private void btnConnectionConfig_Click(object sender, EventArgs e)
        {
            
            var ctf = new ConTestForm();
            ShowForm(ctf);
            if (ctf.Connected)
            {
                Console.WriteLine(ctf.Connection);
            }
        }

        private void btnExit_Click(object sender, EventArgs e)
        {
            Close();
        }
    }
}
